﻿@model MvcCms.Store.Web.ViewModels.DefaultViewModel
@helper Truncate(string input, int length)
    {
    if (input.Length <= length)
    {
    @input
    }
    else
    {
    @input.Substring(0, length)<text>...</text>
    }
}
<h2>Price Options</h2>
<p>
    @Html.ActionLink("Create New", "CreatePriceOption")
</p>
<table>
    <tr>
        <th>
            Title
        </th>
        <th>
            Price
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model._PriceOptions)
    {
        <tr>
            <td>
                @item.Title
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Price)
            </td>
            <td>
                @Html.ActionLink("Edit", "EditPriceOption", new { id = item.PriceOptionID }) 
            </td>
        </tr>
    }
</table>
